Link Search Menu Expand Document

Combat

Подкатегории

Функции


attack_is_aimed

funcX

bool attack_is_aimed()

Returns 1 if the aimed attack mode is selected, 0 otherwise.


block_combat

void block_combat(bool value)

Deny the player to enter combat mode.


combat_data

funcX

mixed combat_data
  • returns a pointer to the C_ATTACK_* data for the current combat attack process (see defined constants in define_extra.h)
  • can be used in conjunction with the get_object_data and set_object_data functions example: sfall_func3("set_object_data", sfall_func0("combat_data"), C_ATTACK_UNUSED, 255);

disable_aimed_shots

void disable_aimed_shots(int pid)

Allows overriding the normal rules regarding which weapons are allowed to make aimed attacks. (e.g. weapons that cause explosive damage normally cannot normally make aimed shots.) stops a weapon from making aimed shots even if it normally coulld. Affects player and NPCs alike. The list of edited weapons is not saved over game loads, so you need to call the function once at each reload. Use a pid of 0 to represent unarmed.


force_aimed_shots

void force_aimed_shots(int pid)

Allows overriding the normal rules regarding which weapons are allowed to make aimed attacks. (e.g. weapons that cause explosive damage normally cannot normally make aimed shots.) Will allow a weapon to make aimed shots even if it normally couldn’t. Affects player and NPCs alike. Does not override the effects of the fast shot trait. The list of edited weapons is not saved over game loads, so you need to call the function once at each reload. Use a pid of 0 to represent unarmed.


get_attack_type

int get_attack_type

get_bodypart_hit_modifier

int get_bodypart_hit_modifier(int bodypart)

Gets the hit percentage modifiers for aiming at specific bodyparts. Valid bodypart id’s are from 0 to 8.


get_critter_current_ap

int get_critter_current_ap(CritterPtr)

Should only be used during the target critters turn while in combat. Calling it outside of combat typically returns the critters max ap, but don’t rely on that behaviour. (Specifically, if the critter has never before entered combat, it will probably return the critters base ap ignoring any extra bonuses from perks etc.)


get_last_attacker

ObjectPtr get_last_attacker(ObjectPtr critter)

Will return the last critter to deliberately launch an attack against the argument critter. If a critter has not launched/received an attack, it will return 0. Outside of combat always returns 0.


get_last_target

ObjectPtr get_last_target(ObjectPtr critter)

Will return the last critter to be deliberately attacked. Outside of combat always returns 0.


set_bodypart_hit_modifier

void set_bodypart_hit_modifier(int bodypart, int value)

Alters the hit percentage modifiers for aiming at specific bodyparts. Valid bodypart id’s are from 0 to 8. Changes are not saved, and will reset to the defaults (or to the values specified in ddraw.ini if they exist) at each reload.


set_critter_burst_disable

void set_critter_burst_disable(int critter, int disable)

set_critter_current_ap

void set_critter_current_ap(CritterPtr, int ap)

Should only be used during the target critters turn while in combat.